package net.da.tools;

public class TypeDescriptor {

	public boolean primitive;

	private ClassDescriptor classDescriptor;

	private String name;

	public TypeDescriptor() {

		primitive = false;
		classDescriptor = null;
		name = "";
	}

	public ClassDescriptor getClassDescriptor() {
		return classDescriptor;
	}

	public void setClassDescriptor(ClassDescriptor classDescriptor) {
		this.classDescriptor = classDescriptor;
	}

	public String getName() {
		if (isPrimitive()) {
			return name;
		}	else {
			return getClassDescriptor().getShortName();
		}		
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isPrimitive() {
		return primitive;
	}

	public void setPrimitive(boolean primitive) {
		this.primitive = primitive;
	}

}
